package com.lam.mall.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;
import javax.validation.constraints.Size;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.lam.common.base.domain.BaseEntity;
import com.lam.common.components.dict.annotation.Dict;
import com.lam.common.utils.DateUtil;
import com.lam.common.validate.annotation.DictCheck;
import com.lam.common.validate.annotation.DictValid;
import com.lam.common.validate.group.Add;
import com.lam.mall.app.vo.UserVo;

/**
 * 商品评论对象 mall_prod_comm
 * 
 * @author admin
 * @date 2023-04-28
 */
@DictCheck
@TableName("mall_prod_comm")
public class ProdComm implements BaseEntity{

    /** 主键 */
    @Null(groups = Add.class, message="id必须为空")
    @TableId(type = IdType.ASSIGN_ID)
    private String id;
    
    /** 商品ID */
    @NotNull(message = "商品ID不能为空")
    private String prodId;

    /** 订单号 */
    @NotBlank(message = "订单号不能为空")
    @Size(max = 50, message = "订单号长度不能超过50个字符")
    private String orderNumber;

    /** 订单项ID */
    private String orderItemId;

    /** 评论用户ID */
    @Size(max = 36, message = "评论用户ID长度不能超过36个字符")
    private String userId;

    /** 评价(0好评 1中评 2差评) */
    @DictValid(message = "无效的评价")
    @Dict(dictCode = "evaluate_type")
    private Integer evaluate;

    /** 评论内容 */
    @Size(max = 500, message = "评论内容长度不能超过500个字符")
    private String content;

    /** 得分，0-5分 */
    private Integer score;

    /** 掌柜回复 */
    @Size(max = 500, message = "掌柜回复长度不能超过500个字符")
    private String replyContent;

    /** 记录时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    /** 回复时间 */
    @JsonFormat(pattern = DateUtil.PATTERN_DEFAULT)
    private Date replyTime;

    /** 是否回复（0-未回复  1-已回复） */
    @DictValid(message = "无效的是否回复")
    @Dict(dictCode = "yn10")
    private Integer replyStatus;

    /** IP来源 */
    @Size(max = 16, message = "IP来源长度不能超过16个字符")
    private String postip;

    /** 有用的计数 */
    private Integer usefulCounts;

    /** 晒图的图片 */
    @Size(max = 1000, message = "晒图的图片长度不能超过1000个字符")
    private String pics;

    /** 是否匿名(1:是  0:否) */
    @DictValid(message = "无效的是否匿名")
    @Dict(dictCode = "yn10")
    private Integer isAnonymous;

    /** 是否显示，1:为显示，0:待审核， -1：不通过审核，不显示。 如果需要审核评论，则是0,，否则1 */
    @DictValid(message = "无效的是否显示，1:为显示，0:待审核， -1：不通过审核，不显示。 如果需要审核评论，则是0,，否则1")
    @Dict(dictCode = "yn10")
    private Integer status;

    @TableField(exist = false)
    private UserVo user;
    
    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    } 

    public void setProdId(String prodId) {
        this.prodId = prodId;
    }

    public String getProdId() {
        return prodId;
    }    
    
    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    public String getOrderNumber() {
        return orderNumber;
    }    
    
    public void setOrderItemId(String orderItemId) {
        this.orderItemId = orderItemId;
    }

    public String getOrderItemId() {
        return orderItemId;
    }    
    
    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUserId() {
        return userId;
    }    
    
    public void setEvaluate(Integer evaluate) {
        this.evaluate = evaluate;
    }

    public Integer getEvaluate() {
        return evaluate;
    }    
    
    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }    
    
    public void setScore(Integer score) {
        this.score = score;
    }

    public Integer getScore() {
        return score;
    }    
    
    public void setReplyContent(String replyContent) {
        this.replyContent = replyContent;
    }

    public String getReplyContent() {
        return replyContent;
    }    
    
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getCreateTime() {
        return createTime;
    }    
    
    public void setReplyTime(Date replyTime) {
        this.replyTime = replyTime;
    }

    public Date getReplyTime() {
        return replyTime;
    }    
    
    public void setReplyStatus(Integer replyStatus) {
        this.replyStatus = replyStatus;
    }

    public Integer getReplyStatus() {
        return replyStatus;
    }    
    
    public void setPostip(String postip) {
        this.postip = postip;
    }

    public String getPostip() {
        return postip;
    }    
    
    public void setUsefulCounts(Integer usefulCounts) {
        this.usefulCounts = usefulCounts;
    }

    public Integer getUsefulCounts() {
        return usefulCounts;
    }    
    
    public void setPics(String pics) {
        this.pics = pics;
    }

    public String getPics() {
        return pics;
    }    
    
    public void setIsAnonymous(Integer isAnonymous) {
        this.isAnonymous = isAnonymous;
    }

    public Integer getIsAnonymous() {
        return isAnonymous;
    }    
    
    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

	public UserVo getUser() {
		return user;
	}

	public void setUser(UserVo user) {
		this.user = user;
	}    
    

}
